package SimpleFactoryMode.version3;

import java.util.Scanner;

/**
 * Created by ycq on 2018/10/10.
 */
public class Main {

    public static void main(String[] args) {
        try{
            Scanner in=new Scanner(System.in);
            System.out.println("请输入数字A");
            String strNumberA=in.next();
            System.out.println("请输入运算符号（+，-，*，/）");
            String strOperate=in.next();
            System.out.println("请输入数字B");
            String strNumberB=in.next();
            String strResult="";
            strResult=String.valueOf(Operation.GetResult(Double.parseDouble(strNumberA),Double.parseDouble(strNumberB),strOperate));
            System.out.println("结果是："+strResult);
        }catch (Exception e){
            System.out.println("您的输入有错"+e.getMessage());
        }
    }



}
